<?php
namespace App\Controller\Api;

use Core\Component\Logger;
use Core\AbstractInterface\AbstractAsyncTask;



class Test extends AbstractAsyncTask{


    function handler(\swoole_server $server,$taskId,$fromId) {
        for($i=0;$i<=5;$i++){
            sleep(1);
        }
        Logger::getInstance()->log('task finish');
    }

    function finishCallBack(\swoole_server $server, $task_id,$resultData) {
        Logger::getInstance()->log('task finishCallBack');
    }
}